package com.feeyo.groundservice.wifi.util

import com.feeyo.android.base.BaseApplication
import com.feeyo.android.util.PreferenceUtils

/**
 *作者：QLH on 2020-11-30
 *描述：灯箱数据缓存
 */
internal object LightBoxCache {

    private val LIGHT_BOX_IP = "light_box_ip"

    @JvmStatic
    fun saveLightBoxIP(ip: String) {
        PreferenceUtils.put(BaseApplication.getContext(), LIGHT_BOX_IP, ip)
    }

    @JvmStatic
    fun getLightBoxIP(): String?{
       val ip = PreferenceUtils.get(BaseApplication.getContext(), LIGHT_BOX_IP, "") as String
        return ip.ifEmpty { null }
    }
}